<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib  uri="http://java.sun.com/jsp/jstl/functions" prefix= "fn"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/messages.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>选 择</title>
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/mainmenu2.css" rel="stylesheet"  type="text/css">
<link href="${ctx}/styles/show.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/mainmenu2.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/listTable.js"></script>


<script language="JavaScript" type="text/javascript">
	var gListOver;
	//处理点击的td  1:改变点击的td样式 2:保存选择的房号ID、房号num到主页面
	function tdOnclickHandle(obj,houseId,houseNum){
		changeTdClick(obj);
		setSelectedHouseInfo(houseId,houseNum);
	}

	function changeTdClick(obj){
		if(gListOver == null){
			obj.className = "td_listTable_record_on";
		} else {
			if (gListOver != obj) {
				gListOver.className = "td_listTable_record_off";
				obj.className = "td_listTable_record_on";
			}
		}
		gListOver = obj;
	}
	function setSelectedHouseInfo(houseId,houseNum){
		parent.setHouseInfo(houseId,houseNum);
	}
</script>
</head>

<body >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outtable">
  <tr>
    <td  valign="top">
	  <div class="leftTree"  >
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>
		  <div style="height:290px;overflow:auto;">

				  <table width="100%" border="0" cellpadding="0" cellspacing="1" >
		                    <tr>
		                      <td align="left" valign="top" nowrap class="LeftdownBlock1" style="padding-top:3px;">
									<c:choose>
										<c:when test="${empty members}">
											<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="room_border">
												<tr>
													<td width="100%" class="td_listTable_record_off"   onFocus="this.blur()">
														列表中没有任何记录
													</td>
												</tr>
											</table>
										</c:when>
										<c:when test="${not empty members }">
						                      	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="room_border">
													<c:forEach items="${members}" var="memberItems" >
														<tr>
															<td align="center" class="listTable_normal_word" width="8%" >${memberItems[0]}F</td>
															<c:forEach items="${memberItems}" var="memberItem" begin="1">
							                        			<td width="${(92 div maxHouseCount) < 8 ?8:(92 div maxHouseCount ) }%" class="td_listTable_record_off"  href="#" name="${memberItem.keyword}" onFocus="this.blur()" onclick="tdOnclickHandle(this,'${memberItem.keyword}','${memberItem.houseNumber}');"  id="${memberItem.keyword}"  order="1">
							                        				${memberItem.houseNumber}
							                        			</td>
															</c:forEach>
															<!-- 添加空列 -->
															<c:if test="${fn:length(memberItems) - 1 < maxHouseCount}">
																<c:forEach begin="1" end="${maxHouseCount - fn:length(memberItems) + 1}">
																	<td  class="td_listTable_record_off"  href="#"  onFocus="this.blur()"   order="1"/>
																</c:forEach>
															</c:if>
														</tr>
													</c:forEach>
						                  		</table>
						                  </c:when>
            					</c:choose>
		                  	</td>
		                 </tr>
		            </table>
			</div>	  </td>
        </tr>
      </table>

      </div></td></tr>
</table>
</body>
</html>
